package jbak.core.file;

import java.io.File;

import jbak.utils.Checksum;

public class Compare {
	
	public static boolean fileIsEqualsMD5(File file1, File file2){
		if(Checksum.MD5(file1) == Checksum.MD5(file2))
			return true;
		else
			return false; 		
	}
	
	public static File fileLastModifier(File file1, File file2)
	{
		if(file1.lastModified() == file2.lastModified())
			return null;
		else if (file1.lastModified() > file2.lastModified())
			return file1;
		else
			return file2;
	}
	
	

}
